ci: run the test suite and docs build on every push and pull request - #5
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Make GitHub run CellularAutomata's tests automatically on every push and every pull request, so nothing lands untested. Add a GitHub Actions workflow at .github/workflows/tests.yml that installs the library exactly the way the repository's own published instructions describe (pip install -e ".[test]", using the test extra rather than installing pytest by hand), runs pytest, and does so across the FULL range of Python versions the repository claims to support - pyproject.toml sets requires-python >=3.8 and classifies 3.8 through 3.14, and the README says 'Requires Python 3.8+', so the matrix deliberately spans 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 rather than a convenient subset. It also builds the manual with the docs extra (pip install -e ".[docs]" then make -C docs html) so a broken documentation build is caught too. Deliberate choices a reviewer should not flag: the workflow is intentionally plain and boring - only actions/checkout@v4 and actions/setup-python@v5, no dependency caching, no third-party actions, no pinned dependency versions, no concurrency group, no explicit permissions block, unfiltered push/pull_request triggers, and fail-fast disabled so every matrix entry reports independently. The scope was constrained to adding only this workflow file; the published install instructions in README.md and docs/getting_started.rst were verified to work verbatim on a clean runner and therefore intentionally left unchanged. Verified on GitHub: run 32224214523 on this branch was green on all 8 jobs, with 23 tests passing on every Python version from 3.8 to 3.14 and the docs build succeeding, so the claimed support range is true and no version needed to be dropped.
What Changed
.github/workflows/tests.yml, triggered unfiltered onpushandpull_request, using onlyactions/checkout@v4andactions/setup-python@v5with no caching, pinning, concurrency group, or explicit permissions block.testjob installs the library the way the repository's own instructions describe (pip install -e ".[test]") and runspytestacross a fail-fast-disabled matrix of Python 3.8 through 3.14, matchingrequires-python >=3.8and the classifiers inpyproject.toml.docsjob installs withpip install -e ".[docs]"and runsmake -C docs htmlon Python 3.12, so a broken manual build fails CI too.The workflow is already green on this branch: run 32224214523 passed all 8 jobs, with 23 tests passing on every Python version from 3.8 to 3.14 and the docs build succeeding. No source, README, or
docs/getting_started.rstchanges were needed; the published install recipe was verified to work verbatim on a clean runner.Risk Assessment
✅ Low: The change adds a single, plain CI workflow file with no source or packaging changes, it satisfies every required constraint in the stated intent, and the identical workflow already ran green on all 8 jobs on this branch.
Testing
I exercised the workflow the way a contributor actually experiences it: the pushed commit already produced GitHub Actions run 32224214523 on this branch, and it is green on all 8 jobs - 23 tests passing on every Python version from 3.8 through 3.14, each installed via the published
pip install -e \".[test]\"extra rather than a hand-rolled pytest install, plus a docs job that installed the docs extra and finishedmake -C docs htmlwithbuild succeeded.. I pulled the per-job CI logs and distilled them into a transcript artifact, captured a screenshot of the run page showing the eight green checks, and independently reproduced the README's own test recipe in a fresh local venv (23 passed on Python 3.14.5) to confirm the published instructions work verbatim. This change has no rendered UI surface of its own, so the reviewer-visible artifact is the Actions run page screenshot, which is the real end-user surface for CI. One gap worth naming: only thepushtrigger has a live run behind it - thepull_requesthalf is declared in the same workflow file GitHub already parsed and executed, but no PR exists on this branch yet and opening one falls outside this phase, so that trigger is verified by declaration rather than by an observed run. No test failures, no flakiness, and I cleaned the transient caches and egg-info my local run created.Evidence: CI transcript: install command, pytest result per Python version, and docs build outcome
GitHub Actions run 32224214523 - workflow 'tests' - branch fm/ci-cellularautomata - event: push - conclusion: success test (3.8) Install pip install -e ".[test]" test (3.8) Run tests platform linux -- Python 3.8.18, pytest-8.3.5, pluggy-1.5.0 test (3.8) Run tests tests/test_pyCA.py ....................... [100%] test (3.8) Run tests == 23 passed in 0.76s == test (3.9) Run tests platform linux -- Python 3.9.25 ... 23 passed in 0.75s test (3.10) Run tests platform linux -- Python 3.10.20 ... 23 passed in 0.80s test (3.11) Run tests platform linux -- Python 3.11.16 ... 23 passed in 0.68s test (3.12) Run tests platform linux -- Python 3.12.13 ... 23 passed in 1.04s test (3.13) Run tests platform linux -- Python 3.13.15 ... 23 passed in 0.84s test (3.14) Run tests platform linux -- Python 3.14.7 ... 23 passed in 0.73s docs Install pip install -e ".[docs]" docs Build the manual build succeeded. docs Build the manual The HTML pages are in _build/html.Evidence: Local reproduction of the README test recipe (fresh venv, Python 3.14.5)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
.github/workflows/tests.yml:38- The docs job runsmake -C docs htmlwithout-W(orSPHINXOPTS=-W), so Sphinx warnings such as broken cross-references, missing toctree entries, or unresolved bibtex citations will not fail the job - only hard build errors are caught. This is a coverage boundary, not a defect: the intent only requires that the manual is built with the docs extra, and turning warnings into errors would expand the deliberately plain scope.✅ **Test** - passed
✅ No issues found.
gh-axi run view 32224214523- confirmed workflowtestson branchfm/ci-cellularautomata, eventpush, conclusionsuccess, all 8 jobs green (test 3.8/3.9/3.10/3.11/3.12/3.13/3.14 + docs)gh-axi run view 32224214523 --job <id> --logfor each of the 7 matrix jobs - confirmed each ranpip install -e ".[test]"and reported23 passedon Python 3.8.18, 3.9.25, 3.10.20, 3.11.16, 3.12.13, 3.13.15, 3.14.7gh-axi run view 32224214523 --job 95980520583 --log(docs job) - confirmedpip install -e ".[docs]"thenmake -C docs htmlending inbuild succeeded.with 14 source files writtenpython3 -m venv+pip install -e ".[test]"+pytest- local reproduction of the README/getting_started install recipe verbatim: 23 passed on Python 3.14.5chrome-devtools-axi open https://github.com/EternalTime/CellularAutomata/actions/runs/32224214523+screenshot- captured the reviewer-visible Actions run page showing all 8 green checksgit status --porcelain --untracked-files=all --ignored- confirmed worktree left clean after removing .pytest_cache, pyCA.egg-info and pycache created by the local run✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.